home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1303_modifying_powerdown_sequence.rtf < prev    next >
Text File  |  1995-06-12  |  1KB  |  22 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Ohlfs;}
  2. \paperw9840
  3. \paperh8400
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red83\green83\blue83;\red82\green82\blue82;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc1\cf1 Q: Can I interpose a program of my own design in the midst of the power-off sequence?\
  8. \
  9. A: If the Workspace Manager is running, or if loginwindow is running, yes,  you might be able to interpose something.  If neither of these is running, no, there's nothing you can do.\
  10. \
  11. When you press the power key (on NeXT hardware), or select the one of the power-off options on non-NeXT hardware, the Workspace Manager or loginwindow then requests confirmation from the user; if the power-off is confirmed, both exec halt(8), passing it the -e and the -p options (eject disks, and power-off).  You could replace\
  12. \
  13.     /etc/halt\
  14. \
  15. with a program (compiled or shell script) of your own design, which would eventually exec the real halt.  Note that it must pass along its arguments to the real halt.\
  16. \
  17. QA483\
  18. \
  19. Valid for 1.0, 2.0, 3.0, 3.1\
  20.  \
  21.  
  22.